<?php

declare(strict_types=1);

use Yansongda\Pay\Pay;

return [
    'alipay' => [
        'default' => [
            // 必填-支付宝分配的 app_id
            'app_id' => '2021003194668521',
            // 必填-应用私钥 字符串或路径
            'app_secret_cert' => 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCz153VEdTtLK9w648ZuKGlCIaZSxNYz/98c3DylW0v3iC99tMUN6ddXVaf3mQhKJ6KhlGlVMra+gJLKWstiVrRLHDQSTQhRYNeZjilxJtsR4DqhVyvqZHwnFaL5eQrZH5TcDWEY/vm9+nntIPSXIL2SLf+UeGFz98ci6VjX1YnYkCcFd494ugfRTBsl8m4K3ckDPia9B2HsMhfNtVxWLjuC5ICTTeldfi+DsT61Hbtb8MZUV669PWAVrZFrtIy+laiXKGlH1w8QpFJkPuPgCbetqH6yiU4mjhULrcDmXgLRaVb3wrEu/FackdSoelp4/wE6+pNQy+3sgONTpwR6xNJAgMBAAECggEAPR69XEmIJOb35ReZdbNi9FSWcgiq1ZczDBervjX8erUySX1WNVvIvJlZNFH/k6lbYFbP7rGHk64+E09LRpmUzNwepxsJ5Xjbcbyp6eSMsdsHPC0A2A54M97eJwOFbR3lNPRAq/LTDKcazo1x849PTuZd6cfoLnL8L5ZiKgifnhhZkKp3/1ZMv0t82nmbO7EPnYoZPACvIbhh9ozjoX9Fa00wUlTHzXda6Wg84Lgrf2tfNz1nAKJhksPt9V456DCF+rMJwhjXrTljUm97iNyVvonEfOiCOpZv9y5VpqI8zT+Gxdnya8ZAYHAvbQPf16YkjmSCQiIval4Sk6flqvxOAQKBgQD7aMe/nUnnLMEZv9BeWVRRTLWywl4eJbad/C0amBtdKIQm97u7BxTYlLJA4/CPKCVjUdJL6Hv5aCiT7qzw2fcqYFn3EcYjrkThTanehji4+mX74jjXq/iM9fs0PkCA+RaisX+dtKj8wCXpdIZ77Nfc4fnq55p62MMvT6rjLWP/iQKBgQC3IEtLydhkBDmhZKxpmNWdmVjTvCyiCZWfO6OhAZhmvdUqhV3Af3KsFswa+syMLopIk/CbGlyL/o4Nc8wKWkKgu5o6nRC4lSacQFPGirtKaMZDkFr4b+ao8np8kIvsYFNmOz43rXYn+7loyMtXSb1OhN8Ghv9LRYJIaT3H0wvFwQKBgQCQEAC2KjlZAOo+CQ4romCQnbZYksw/1jiI2yI1ZQf5H+hqM/cdOveVC9ABIxyLy+NwwEgTO0sfJbJq4o+zDBN38vJag5LYi1npCQnX+22xgbrC1WThISgyDho+W5W20gVIgRGxmv5ipvCSkDUn+hXP+qWtF74Luv5NtAcmWrI8kQKBgEjnj3J1wjNXR0ZMmSNVGD4s7aMl+DLuU+XXzXXs96p3iuTpwYBAfPur+8gF7uckJCNu2kw1e4C0cANFBYddlcb9yRHqs9x4bK2qInAZjSS7f6soTj839YFvP3pV5Y7OboV1snhiE3cpjQ/9WI7AqaAX395uYjaqTorbcyAZkkdBAoGANcuZD7CYlL5ysMZKZZP+7F6zDxc1MBmsOKvSgzzTD4FCbrM0DSUeAxkuGXZC3auluI99bH/x/QeeUl2my8JN2V4mCU+gEAFuYU3cQgxy4eBsRZNrN5pk/7XWmQeAy2AEyB+ORHhFjuZDA2rzv0JgluA5GVGB7tgJXzhq5tDXYe4=',
            // 必填-应用公钥证书 路径
            'app_public_cert_path' => public_path('cert/appCertPublicKey_2021003194668521.crt'),
            // 必填-支付宝公钥证书 路径
            'alipay_public_cert_path' => public_path('cert/alipayCertPublicKey_RSA2.crt'),
            // 必填-支付宝根证书 路径
            'alipay_root_cert_path' => public_path('cert/alipayRootCert.crt'),

            'return_url' => '',

            'notify_url' => env('APP_URL').'api/order/goods/alipay/notify_url',
            // 选填-服务商模式下的服务商 id，当 mode 为 Pay::MODE_SERVICE 时使用该参数
            'service_provider_id' => '',
            // 选填-默认为正常模式。可选为： MODE_NORMAL, MODE_SANDBOX, MODE_SERVICE
            'mode' => Pay::MODE_NORMAL,
        ],
    ],
    'wechat' => [
        'default' => [
            // 必填-商户号，服务商模式下为服务商商户号
            'mch_id' => '',
            // 必填-商户秘钥
            'mch_secret_key' => '',
            // 必填-商户私钥 字符串或路径
            'mch_secret_cert' => '',
            // 必填-商户公钥证书路径
            'mch_public_cert_path' => '',
            // 必填
            'notify_url' => '',
            // 选填-公众号 的 app_id
            'mp_app_id' => '',
            // 选填-小程序 的 app_id
            'mini_app_id' => '',
            // 选填-app 的 app_id
            'app_id' => '',
            // 选填-合单 app_id
            'combine_app_id' => '',
            // 选填-合单商户号
            'combine_mch_id' => '',
            // 选填-服务商模式下，子公众号 的 app_id
            'sub_mp_app_id' => '',
            // 选填-服务商模式下，子 app 的 app_id
            'sub_app_id' => '',
            // 选填-服务商模式下，子小程序 的 app_id
            'sub_mini_app_id' => '',
            // 选填-服务商模式下，子商户id
            'sub_mch_id' => '',
            // 选填-微信公钥证书路径, optional，强烈建议 php-fpm 模式下配置此参数
            'wechat_public_cert_path' => [
                '45F59D4DABF31918AFCEC556D5D2C6E376675D57' => __DIR__.'/Cert/wechatPublicKey.crt',
            ],
            // 选填-默认为正常模式。可选为： MODE_NORMAL, MODE_SERVICE
            'mode' => Pay::MODE_NORMAL,
        ],
    ],
    'unipay' => [
        'default' => [
            // 必填-商户号
            'mch_id' => '',
            // 必填-商户公私钥
            'mch_cert_path' => '',
            // 必填-商户公私钥密码
            'mch_cert_password' => '000000',
            // 必填-银联公钥证书路径
            'unipay_public_cert_path' => '',
            // 必填
            'return_url' => '',
            // 必填
            'notify_url' => '',
        ],
    ],
    'http' => [ // optional
        'timeout' => 5.0,
        'connect_timeout' => 5.0,
        // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
    ],
    // optional，默认 warning；日志路径为：sys_get_temp_dir().'/logs/yansongda.pay.log'
    'logger' => [
        'enable' => false,
        'file' => null,
        'level' => 'debug',
        'type' => 'single', // optional, 可选 daily.
        'max_file' => 30,
    ],
];
